<!DOCTYPE HTML>
<html>
<head>
    <include file="public:headtop"/>
    <link href="/static/css/general.css" rel="stylesheet">
    <link href="/static/css/result.css" rel="stylesheet">
</head>

<body>
<include file="public:headmini1"/>

<ul class="result-box">
    <if condition="($havedata eq 'y')">
        <volist name="item_list" id="item">
            <li>
                <a href="{:U('Item/index', array('id' => $item['id']))}">
                    <div class="oh">
                        <div class="result-img pull-left"><img src="{$item.img}" alt=""/></div>
                        <div class="result-text pull-left">
                            <div class="result-h1">{$item.title}</div>
                            <div class="result-h2">适用范围：<span>{$item.syfw}</span></div>
                            <div class="result-h2">
                                透光率：<span class="margin-right-5">{$item.touguangdu}%</span>
                                防晒指数：<span class="margin-right-5">{$item.fangshai}%</span>
                                隔热率：<span class="margin-right-5">{$item.geredu}%</span>
                            </div>
                        </div>
                    </div>
                    <div class="result-h3 oh">
                        <div class="pull-left text-blue margin-right-10">原价：<span>￥{$item.price}</span></div>
                        <div class="pull-left text-red">现价：<span>￥<?php echo $item['price']*0.8;?></span></div>

                        <!-- <div class="pull-left text-blue margin-right-10">售价：<span>￥{$item.price}</span></div> -->
                        <!-- <div class="pull-left text-red">奖励：<span>￥{$item.jianglimax}</span></div> -->
                        <div class="btn-box pull-right">
                            <button data="{$item.id}">立即购买</button>
                        </div>
                    </div>
                </a>
            </li>
        </volist>
        <else/>
        <div class="result_none">暂无数据，请选择其他分类</div>
    </if>
</ul>
<script>
    /*用于绑定移动端点击事件*/
    document.body.addEventListener('touchstart', function () {

    });

    var n = 0;
    function svg() {
        if (n < 1) {
            n = n + 1;
        } else {
            n = 0
        }
        ;
        if (n == 0) {
            $("#img-box img").attr("src", "/static/images/img26.png");
        }
        if (n == 1) {
            $("#img-box img").attr("src", "/static/images/img25.png");
        }
    }
    document.getElementById('ope').addEventListener('touchstart', function () {
        $('.box').slideToggle('slow');
        svg();
    });

    $('.btn-box>button').click(function () {
        var url = "{:U('Item/index')}";
        var id = $(this).attr('data');
        location.href = url + '&id=' + id;
    });
    $('.nav li').click(function () {
        $('.nav02-box').css('display', 'block');
        $('.nav li').removeClass('bor');
        $(this).addClass('bor');
    });
    $('.nav02 li').click(function () {

        $('.nav02 li').removeClass('bor');
        $(this).addClass('bor');
    })
    $('.nav03 li').click(function () {
        $('.nav03 li').removeClass('bor');
        $(this).addClass('bor');
    })

    $('.nav li:eq(0)').click(function () {
        $('.nav02-box ul').css('display', 'none');
        $('.nav02-box ul:eq(0)').addClass('animated fadeIn').css('display', 'block');
    });
    $('.nav li:eq(1)').click(function () {
        $('.nav02-box ul').css('display', 'none');
        $('.nav02-box ul:eq(1)').addClass('animated fadeIn').css('display', 'block');
    });
    $('.nav li:eq(2)').click(function () {
        $('.nav02-box ul').css('display', 'none');
        $('.nav02-box ul:eq(2)').addClass('animated fadeIn').css('display', 'block');
    })
    $('.nav li:eq(3)').click(function () {
        $('.nav02-box ul').css('display', 'none');
        $('.nav02-box ul:eq(3)').addClass('animated fadeIn').css('display', 'block');
    })
    $('.nav li:eq(4)').click(function () {
        $('.nav02-box ul').css('display', 'none');
        $('.nav02-box ul:eq(4)').addClass('animated fadeIn').css('display', 'block');
    })
    $('.nav li:eq(5)').click(function () {
        $('.nav02-box ul').css('display', 'none');
        $('.nav02-box ul:eq(5)').addClass('animated fadeIn').css('display', 'block');
    })
    $('.nav li:eq(6)').click(function () {
        $('.nav02-box ul').css('display', 'none');
        $('.nav02-box ul:eq(6)').addClass('animated fadeIn').css('display', 'block');
    })
    $('.nav li:eq(7)').click(function () {
        $('.nav02-box ul').css('display', 'none');
        $('.nav02-box ul:eq(7)').addClass('animated fadeIn').css('display', 'block');
    })


    /*$('.box .nav02').hide();
     $('.box .nav02:first').show();
     document.getElementById('li01').addEventListener('touchstart', function () {
     $('.nav02').hide();
     $('.nav02:eq(0)').addClass('animated fadeIn').css('display','block');
     });
     document.getElementById('li02').addEventListener('touchstart', function () {
     $('.nav02').hide();
     $('.nav02:eq(1)').addClass('animated fadeIn').css('display','block');
     });	*/
    /*	for(var i=0;i<8;i++){
     var nav=document.getElementById('nav').getElementsByTagName('li')[i];
     nav.addEventListener('touchstart', function () {
     var und=document.getElementById('nav02-box').getElementsByTagName('ul')[i];
     });
     und.addEventListener('touchstart', function () {
     $('.box').slideToggle('slow');
     });
     /*		}*/
    /*	for(var i=0;i<8;i++){
     var nav=document.getElementById('nav').getElementsByTagName('li')[i];
     var und=document.getElementById('nav02-box').getElementsByTagName('ul')[i];
     nav.addEventListener('touchstart', function () {

     $('.nav02-box ul').hide();
     und.style.display='block';
     })

     }	*/


</script>
</body>
</html>